package com.ycfmedical.bed.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.provider.AlarmClock;
import android.view.View;

import com.bilibili.magicasakura.widgets.TintButton;
import com.ycfmedical.bed.R;
import com.ycfmedical.bed.base.BaseMenuActivity;

import butterknife.BindView;
import butterknife.OnClick;
import cn.droidlover.xdroidmvp.router.Router;

/**
 * Created by Administrator on 2017/3/16 0016.
 */

public class TimingClockActivity extends BaseMenuActivity
{

    @BindView(R.id.btn_setalarm)
    TintButton btnSetalarm;
    @BindView(R.id.btn_showalarms)
    TintButton btnShowalarms;
    @BindView(R.id.btn_repast)
    TintButton btnRepast;
    @BindView(R.id.btn_transfusion)
    TintButton btnTransfusion;
    @BindView(R.id.btn_medicine)
    TintButton btnMedicine;
    @BindView(R.id.btn_getup)
    TintButton btnGetup;
    @BindView(R.id.btn_rest)
    TintButton btnRest;
    @BindView(R.id.btn_examine)
    TintButton btnExamine;

    @Override
    public void initData(Bundle savedInstanceState)
    {

    }

    @Override
    public int getLayoutId()
    {
        return R.layout.activity_timingclock;
    }

    @Override
    public Object newP()
    {
        return null;
    }


    @OnClick({R.id.btn_setalarm, R.id.btn_showalarms, R.id.btn_repast, R.id.btn_transfusion,
            R.id.btn_medicine, R.id.btn_getup, R.id.btn_rest, R.id.btn_examine })
    public void onClick(View view)
    {
        switch (view.getId())
        {
            //自定义提醒
            case R.id.btn_setalarm:
                Intent alarmOne = new Intent(AlarmClock.ACTION_SET_ALARM);
                startActivity(alarmOne);
                break;
            //修改提醒时间/内容
            case R.id.btn_showalarms:
                Intent alarmTwo = new Intent(AlarmClock.ACTION_SHOW_ALARMS);
                startActivity(alarmTwo);
                break;
            //定时就餐提醒
            case R.id.btn_repast:
                Intent alarmThree = new Intent(AlarmClock.ACTION_SET_ALARM);
                startActivity(alarmThree);
                break;
            //定时输液提醒
            case R.id.btn_transfusion:
                Intent alarmFour = new Intent(AlarmClock.ACTION_SET_ALARM);
                startActivity(alarmFour);
                break;
            //定时用药提醒
            case R.id.btn_medicine:
                Intent alarmFive = new Intent(AlarmClock.ACTION_SET_ALARM);
                startActivity(alarmFive);
                break;
            //定时起床提醒
            case R.id.btn_getup:
                Intent alarmSix = new Intent(AlarmClock.ACTION_SET_ALARM);
                startActivity(alarmSix);
                break;
            //定时休息提醒
            case R.id.btn_rest:
                Intent alarmSeven = new Intent(AlarmClock.ACTION_SET_ALARM);
                startActivity(alarmSeven);
                break;
            //定时查房提醒
            case R.id.btn_examine:
                Intent alarmEight = new Intent(AlarmClock.ACTION_SET_ALARM);
                startActivity(alarmEight);
                break;
        }
    }

    public static void launch(Activity activity)
    {
        Router.newIntent(activity).to(TimingClockActivity.class).launch();
    }
}
